/**
 * Created by ste on 2018/1/12.
 */
import React, { Component } from 'react';
import {
  View,
  Text,
  ScrollView,
  StyleSheet,
} from 'react-native';
import Footer from '../components/Footer';
import ShopCarItem from '../components/ShopCarItem';
import CarData from '../logics/CarData';
const  styles = StyleSheet.create({
  root: {
    flex: 1,
  },
});
export default class ShopCar extends Component {
  static navigationOptions = {
    title: '购物车',
    headerRight:
    <View style={{ flexDirection: 'row' }}>
      <Text style={{ color: 'red' }}>more</Text>
    </View>
  };
  render() {
    return (
      <View style={styles.root}>
        <ScrollView>
          {
            CarData.map((data, index) => {
              return <ShopCarItem key={data.id} index={index} data={data} CarData={CarData} />
            })
          }
        </ScrollView>
        <Footer CarData={CarData} />
      </View>

    );
  }
}
